<!--
 * @Description: 
 * @Author: xiongkuobiao
 * @Date: 2023-02-28 11:09:31
 * @LastEditors: xiongkuobiao
 * @LastEditTime: 2023-04-10 11:14:38
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div class="triangle"></div>
    <style>
        .triangle {
            width: 0;
            height: 0;
            background-color: transparent;
            border-top: 50px solid red;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
        }
    </style>
</body>
<script>
    // var a = 222;
    // (function () {
    //   a = 2;
    //   console.log(a);
    // })();
    // console.log(a);

    // let str = "get-element-by-id";
    // let str2 = "";
    // let aa = str.split("-").map((item) => {
    //   return item.slice(0, 1).toUpperCase().concat(item.slice(1));
    // });

    // console.log(
    //   aa.join("").slice(0, 1).toLowerCase() + "" + aa.join("").slice(1)
    // );

    // for (let i = 0; i < arr.length; i++) {
    //   for (let j = 0; j < arr.length - i - 1; j++) {
    //     if (arr[j] > arr[j + 1]) {
    //       let temp = arr[j];
    //       arr[j] = arr[j + 1];
    //       arr[j + 1] = temp;
    //     }
    //   }
    // }
    // console.log(arr);

    let arr = [1, -1, 33333, 222, 1, -1, 1133333333333, 44];
    // let le = [];
    // for (let i = 0; i < arr.length; i++) {
    //   le[le.length] = arr[arr.length - i - 1];
    // }
    // console.log(le);

    // console.log([...new Set(arr)]);
    let newAr = [];
    for (let i = 0; i < arr.length; i++) {
        if (!newAr.includes(arr[i])) {
            newAr.push(arr[i]);
        }
    }
    console.log(newAr);
</script>

</html>